<template>
  <div class="d-flex justify-content-between align-items-center">
    <div>第{{ config_paging.paging.size }}页 共2页,共{{ showTable.length }}条</div>
    <div class="block">
      <el-pagination @current-change="handleCurrentChange" :page-sizes="[1, 2, 3, 4, 5]" layout="prev, pager, next,sizes, jumper" :total="100"> </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Com-paging',
  props: {
    config_paging: {
      type: Object,
    },
    showTable: {
      type: Array,
    },
    TableData: {
      type: Array,
    },
  },
  data() {
    return {}
  },
  methods: {
    handleSizeChange(val) {
      this.config_paging.paging.yetiao = val
      this.showTable = this.TableData.slice(0, val)
    },
    handleCurrentChange(currentRow) {
      this.config_paging.paging.size = currentRow
      this.showTable = this.TableData.slice(currentRow * this.config_paging.paging.yetiao - this.config_paging.paging.yetiao, currentRow * this.config_paging.paging.yetiao)
    },
  },
  mounted() {},
}
</script>

<style lang="scss" scoped></style>
